<template>
  <div v-if="!value.source">
    <template v-if="value.theme == 'default' || value.theme == 'border' ">
      <el-radio-group v-model="radio" :size="value.size">
        <el-radio v-for="(item,index) in value.options" :key="index" :label="item.value" :border="value.theme == 'border' ? true : false" :disabled="item.disabled">{{item.label}}</el-radio>
      </el-radio-group>
    </template>
    <template v-if="value.theme == 'button' ">
      <el-radio-group v-model="radio" :size="value.size">
        <el-radio-button v-for="(item,index) in value.options" :key="index" :label="item.value" :border="value.theme == 'border' ? true : false" :disabled="item.disabled">{{item.label}}</el-radio-button>
      </el-radio-group>
    </template>
  </div>
</template>
<script type="text/javascript">
// import Logo from '~/components/Logo.vue'
export default {
  props: {
    value: [Array, Object]
  },
  components: {
    //Logo
  },
  data() {
    return {
      radio: 1
    }
  },
  /**
   * 计算属性
   * @type {Object}
   */
  computed: {

  },
  /**
   * 数据监听
   * @type {Object}
   */
  watch: {

  },
  /**
   * 页面加载执行
   * @return {[type]} [description]
   */
  mounted() {

  },
  /**
   * 页面方法
   * @type {Object}
   */
  methods: {

  }
}

</script>
<style type="text/css" lang="scss">
.radio-view {
  .el-radio {
    margin-right: 10px;
    margin-bottom: 5px;
  }

  .el-radio__label {
    margin-left: 5px;
    padding-left: 0px;
  }

  .el-radio.is-bordered+.el-radio.is-bordered {
    margin-left: 0px;
  }
}

</style>
